package com.itheima.jdk8date;

import java.time.LocalDate;
import java.time.LocalTime;

/*
minus方法
 */
public class Demo06 {

    public static void main(String[] args) {
        LocalDate now = LocalDate.now();
        System.out.println(now.minusYears(30));
        System.out.println(now.minusMonths(20));
        System.out.println(now.minusDays(500));
        System.out.println(now.minusWeeks(3));
        LocalTime time = LocalTime.now();
        System.out.println(time.minusHours(-10));
        System.out.println(time.minusMinutes(-20));
        System.out.println(time.minusSeconds(-600));
        System.out.println(time.minusNanos(-1000000000));


    }
}
